package test;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;


//输入一个字符串 可以有空格,输出逆向字符串
public class topic02 {
    public static void main(String[] args){
        Scanner sn = new Scanner(System.in);
        String str = sn.nextLine();
        List<Character> list = new ArrayList <Character>();//以ArrayList数组储存字符
        for (int i = str.length()-1; i >= 0; i--) {
            list.add(str.charAt(i));//反向将str字符串中的字符加入list
        }
        for (Character character : list) {
            System.out.print(character);//遍历拿出
        }
    }
}
